<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>


</head>
<body>

<button id="select">
    查找
</button>

<button id="insert">
    插入
</button>

<button id="updata">
    更新
</button>
<button id="delete">
    删除
</button>

</body>
<script src="./jquery-1.11.3.js"></script>

<script>
    $("#select").click(function(){
        //'username=lixiaoxi&password=111111'
        console.log(111111);
        $.ajax(
            {
                url:"http://localhost:8093/aUser/getAllAUser",
                data:{userId:2,username:"lixiaoxi",password:"111111"} ,
                method:"post",
                contentType:"application/x-www-form-urlencoded",
                success:function(result){
                    console.log(result);
                }
            });

    });
    $("#insert").click(function(){
        //'username=lixiaoxi&password=111111'
        console.log(111111);
        $.ajax(
            {
                url:"http://localhost:8093/aUser/insertAUser",
                data:JSON.stringify({userId:2,username:"lixiaoxi",password:"111111"}) ,
                method:"post",
                contentType:"application/json",
                success:function(result){
                    console.log(result);
                }
            });

    });
    $("#delete").click(function(){
        //'username=lixiaoxi&password=111111'
        console.log(111111);
        $.ajax(
            {
                url:"http://localhost:8093/aUser/deleteAUserById",
                data:{grade:2,losal:3,hisal:"111111"} ,
                method:"post",
                contentType:"application/x-www-form-urlencoded",
                success:function(result){
                    console.log(result);
                }
            });

    });
    $("#updata").click(function(){
        //'username=lixiaoxi&password=111111'
        console.log(111111);
        $.ajax(
            {
                url:"http://localhost:8093/aUser/updateAUser",
                data:JSON.stringify({userId:2,username:"lixiaoxi",password:"111111"}) ,
                method:"post",
                contentType:"application/json",
                success:function(result){
                    console.log(result);
                }
            });

    });
</script>
</html>